﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PSE.Framework.ProviderLoader;
using Sinacor.Infra.UI.Security.Licensing;
using System.IO;
using PSE.Framework.ProviderLoader.Configuration;
using PSE.LogPackager.Common;

namespace Sinacor.Infra.UI.LogPackager.Providers
{
    public class LicenseProvider : BaseProvider, ILicenseProvider
    {
        public LicenseProvider(ProviderConfigurationElement configuration)
            : base(configuration)
        {
        }

        public void DownloadLicenceFile(string destFile)
        {
            byte[] file = LicensingManager.GetInstance().GetLicesingFromServer();
            File.WriteAllBytes(destFile, file);
        }
    }
}
